<script setup lang="ts">
import constants from '@/config/constants'
onLaunch(() => {
  // eslint-disable-next-line no-console
  console.log('App Launch')
  const openToken = uni.getStorageSync('openToken')
  const lastLoginTime = uni.getStorageSync('lastLoginTime') || 0
  const expirationTime = constants.ONE_DAY
  if (expirationTime !== Infinity) {
    const diffTime = Date.now() - lastLoginTime
    if (diffTime > expirationTime) uni.removeStorageSync('openToken')
  }
})
onShow(() => {
  // eslint-disable-next-line no-console
  console.log('App Show')
})
onHide(() => {
  // eslint-disable-next-line no-console
  console.log('App Hide')
})
</script>

<style lang="scss">
/* 每个页面公共css 放app.vue页面的 */
@font-face {
  font-family: 'font_family'; /* project id 1991769 */
  src: url('//at.alicdn.com/t/font_1991769_u8wpg8jfhpq.eot');
  src: url('//at.alicdn.com/t/font_1991769_u8wpg8jfhpq.eot?#iefix') format('embedded-opentype'),
    url('//at.alicdn.com/t/font_1991769_u8wpg8jfhpq.woff2') format('woff2'),
    url('//at.alicdn.com/t/font_1991769_u8wpg8jfhpq.woff') format('woff'),
    url('//at.alicdn.com/t/font_1991769_u8wpg8jfhpq.ttf') format('truetype'),
    url('//at.alicdn.com/t/font_1991769_u8wpg8jfhpq.svg#iconfont') format('svg');
}

.font_family {
  font-family: 'font_family' !important;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-style: normal;
  -webkit-text-stroke-width: 0.2px;
}
@import 'uview-plus/index.scss';
</style>
